<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <!-- 2.准备容器 -->
  <div id="app">
    Vue的模板

    <!-- v-on:事件名=“内联语句”
        @事件名=“内联语句” -->
    <button @click="totalCount--">-</button>
    <span>{{totalCount}}</span>
    <button v-on:click="totalCount++">+</button>

  </div>
  <!-- 1.导入vue.js -->
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

  <script>
    // 3创建实例化对象
    const app = new Vue({
      // 容器id
      el: '#app',
      // 数据
      data: {
        totalCount: 1
      }
    })
    console.log(app)
  </script>
</body>

</html>